<html>
	<head>
		<title>Data - BigQuery Endpoint</title>
		<link type="text/css" rel="stylesheet" href="/css/style.css" />
		<script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
		<script type="text/javascript" src="/js/bqs.js"></script>
	</head>
<body>	
	<div id="menu">{{ menu }}</div>
	<div id="currentuser">{{ cuser }}</div>
	
	<div id="header">
		<a href="/" title="Home" class="home">BigQuery Endpoint</a>
	</div>

	<div id="main">
		<h2>Datasets</h2>
		<div id="datasets">
			<p>The following datasets have been successfully imported into the default table <code>[lodcloud/rdftable]</code>  and are available in the BigQuery Endpoint:</p>
			{{ datasetstats }}
			<table id="dslist">
				<tr><th>Dataset</th><th>Data File</th><th>Graph URI</th><th>Status</th></tr>
			{% for datasetlink in datasetlinks %}
				<tr class="datasetentry">{{ datasetlink }}</tr>
			 {% endfor %}
			</table>
		</div>
		{% if isadmin %}
		<div id="impcontrol"></div>
		<div id="importf">
			<form action="{{ upload_url }}" method="POST" enctype="multipart/form-data">
				<fieldset>
					<legend>Import</legend>
					<label>RDF file*</label><br />
						<input type="file" name="ntfile" accept="text/plain" />
					<div id="noteupload">* must be in <a href="http://www.w3.org/TR/rdf-testcases/#ntriples">NTriples</a> format</div>	
					<label>Target graph URI</label><br />
						<input type="input" name="tgraphURI" size="50" value="http://example.org" />
					<div class="cmd">
						<input type="submit" name="submit" value="Import data!" />
					</div>
				</fieldset>
			</form>
		</div>
		{% endif %}
	</div>

	<div id="footer">{{ footer }}</div>
</body>
</html>